package com.doubao.device.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.doubao.device.entity.SmartDeviceTagRelation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


/**
 * 智能体标签关系Mapper
 */
@Mapper
public interface SmartDeviceTagRelationMapper extends BaseMapper<SmartDeviceTagRelation> {

    /**
     * 根据标签ID删除关系
     *
     * @param tagId 标签ID
     * @return 影响行数
     */
    int deleteByTagId(@Param("tagId") Long tagId);

    /**
     * 根据智能体ID删除关系
     *
     * @param deviceId 智能体ID
     * @return 影响行数
     */
    int deleteByDeviceId(@Param("deviceId") Long deviceId);
}